/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package sll.circular;

/**
 *
 * @author mweya
 */
public class Node<AnyType> {
    private Node next = null;
    private AnyType data = null;
    
    public Node () {
        
    }
    
    public Node(AnyType data) {
        this.data = data;
    }
    
    
    public AnyType getData() {
        return this.data;
    }
    
    public Node getNext() {
        return this.next;
    }
    
    public void setData(AnyType data) {
        this.data = data;
    }
    
    
    public void setNext(Node next) {
        this.next = next;
    }
    
    @Override
    public String toString() {
        return "Node=("+this.data+", "+this.next+"->)";
    }
    
}